import apache.rocketmq.v2.Message;
import org.apache.rocketmq.client.apis.ClientConfiguration;
import org.apache.rocketmq.client.apis.ClientException;
import org.apache.rocketmq.client.apis.ClientServiceProvider;
import org.apache.rocketmq.client.apis.producer.Producer;
import org.apache.rocketmq.client.apis.producer.ProducerBuilder;
import org.apache.rocketmq.client.java.impl.producer.ProducerBuilderImpl;

import java.time.Duration;

public class Produce_Test {

    public static void main(String[] args) {

        final ClientServiceProvider provider = ClientServiceProvider.loadService();


        //


        String endpoint = "127.0.0.1:9876";
        String topic = "Produce_Test";

        ClientConfiguration clientConfiguration = ClientConfiguration.newBuilder()
                .setEndpoints(endpoint)
                .setRequestTimeout(Duration.ofSeconds(30))
                .build();
        ProducerBuilder producerBuilder = new ProducerBuilderImpl();

        try {
            Producer build = producerBuilder.setClientConfiguration(clientConfiguration).setTopics(topic).build();

//            Message message = Message.newBuilder()
//                    .setTopic(topic)

//                    .build();

        } catch (ClientException e) {


        }


    }


}
